-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating to Platform 2.0.0 #66
base: master
Are you sure you want to change the base?
Conversation
* compliance with the License. You may obtain a copy of the License at | ||
* http://license.openmrs.org | ||
* | ||
* Software distributed under the License is distributed on an "AS IS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you delete this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class used org.openmrs.module.web.extension
, unavailable on 2.0.0
. Also, this class is not used in the code. That's why I removed it.
Should I revert this change and use the legacy UI module to provide org.openmrs.module.web.extension
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkayiwa I think using the legacy UI module is better, so I updated the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this class, do the module's admin links still display on the admin page? https://qa-refapp.openmrs.org/openmrs/admin/index.htm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't, I updated the PR.
e2f6831
to
ff44719
Compare
@@ -211,7 +211,7 @@ protected Object task() { | |||
return null; | |||
} | |||
|
|||
}.executeInManualFlushMode(); | |||
}.executeInAutoFlushMode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this does not have any runtime side effects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we run this in AutoFlushMode we get the following error: https://gist.github.com/wikumChamith/1a1c66da05937e3883d0f7c922871218
This might be caused because we have added Transactional here: https://github.com/openmrs/openmrs-core/blob/889ccc1cf4d13b4e09ae9ff3ea6713cb685b3cef/api/src/main/java/org/openmrs/api/db/hibernate/HibernateContextDAO.java#L319-L322
I tested this and didn't notice any problems. I think there is a chance this could slightly affect the performance.
<dependency> | ||
<groupId>org.simpleframework</groupId> | ||
<artifactId>simple-xml</artifactId> | ||
<version>2.7.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the scope for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this to the test scope
ff44719
to
82f7e45
Compare
@@ -104,8 +110,8 @@ public void prepareImportServer() throws Exception { | |||
@Override | |||
public void runOnImportServerAfterImport() throws Exception { | |||
Concept c = Context.getConceptService().getConcept(newConceptId); | |||
|
|||
Assert.assertNull("The concept was found with the same id, wha happened??", c); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mind explaining why you changed this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In platform 2.0 Context.getConceptService().getConcept(newConceptId);
returns the concept. That's why I had to change the test.
|
||
@Override | ||
public List<?> prepareExportServer() throws Exception { | ||
|
||
Concept c = new Concept(); | ||
c.addName(new ConceptName("Test", Locale.US)); | ||
|
||
c.addDescription(new ConceptDescription("Description", Locale.ENGLISH)); | ||
concept = c; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the above line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In platform 2.0, the concept must have a description otherwise it gives the following error when saving.
'Concept #null' failed to validate with reason: descriptions: Concept.description.atLeastOneRequired
No description provided.